package com.dingyuhang.bean;

import java.io.Serializable;
import java.util.Date;


public class Reply implements Serializable{

	

	/**
	 * 
	 */
	private static final long serialVersionUID = 1432998818700041346L;

	/**
	 * 主键
	 */
	private Integer id;
	
	/**
	 * 回复内容
	 */
	private String content;
	/**
	 * 回复的帖子 topic_id
	 */
	private Topic topic;
	/**
	 * 帖子回复者 user_id
	 */
	private User user;
	/**
	 * 回复的楼层
	 */
	private Integer floor;
	/**
	 * 帖子的回复时间
	 */
	private Date replyTime;
	
	/**
	 * 回复的更新时间
	 */
	private Date updated;

	public Reply() {
		super();
	}

	public Reply(Integer id, String content, Topic topic, User user, Integer floor, Date replyTime, Date updated) {
		super();
		this.id = id;
		this.content = content;
		this.topic = topic;
		this.user = user;
		this.floor = floor;
		this.replyTime = replyTime;
		this.updated = updated;
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public Topic getTopic() {
		return topic;
	}

	public void setTopic(Topic topic) {
		this.topic = topic;
	}

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	public Integer getFloor() {
		return floor;
	}

	public void setFloor(Integer floor) {
		this.floor = floor;
	}

	public Date getReplyTime() {
		return replyTime;
	}

	public void setReplyTime(Date replyTime) {
		this.replyTime = replyTime;
	}

	public Date getUpdated() {
		return updated;
	}

	public void setUpdated(Date updated) {
		this.updated = updated;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((id == null) ? 0 : id.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Reply other = (Reply) obj;
		if (id == null) {
			if (other.id != null)
				return false;
		} else if (!id.equals(other.id))
			return false;
		return true;
	}

	@Override
	public String toString() {
		return "Reply [id=" + id + ", content=" + content + ", topic=" + topic + ", user=" + user + ", floor=" + floor
				+ ", replyTime=" + replyTime + ", updated=" + updated + "]";
	}
	
	
	
}
